<script>
var url = location.href,
    hashParams = url.substr(url.indexOf('#') + 1).split('&'),
    targetFrame, receive;

try {
  targetFrame = hashParams[0] === '..' ? parent.parent
                                       : parent.frames[hashParams[0]];
  receive = targetFrame.gadgets.rpc.receive;
} catch (e) {
}

receive && receive(hashParams);
</script>
